home *** CD-ROM | disk | FTP | other *** search
/ AP Professional Graphics CD-ROM Library / AP Professional Graphics CD-ROM Library.iso / mac / Macintosh / Appendix / GemsIII / Source Code Gems III / luminaire / geometry_object.h < prev    next >
Encoding:
Text File  |  1995-03-08  |  844 b   |  29 lines  |  [TEXT/MSWD]

  1. // ******************************************************************
  2. //
  3. // Physically Correct Direct Lighting For Distribution Ray Tracing
  4. //             by Changyaw Wang
  5. //
  6. // geometry_object.h
  7. //
  8. // ******************************************************************
  9.  
  10. //  Abstract class geom_obj may be subclassed to a particular type of 
  11. //  object such as a sphere, or a triangle.
  12.  
  13. class point;
  14.  
  15. class geom_obj {
  16. public:
  17.  
  18.     // Selects a point visible from x given (r1,r2).  
  19.     // Here, visible means not SELF-shadowed.
  20.  
  21.     virtual void select_visible_point(
  22.              const point& x,   // viewpoint
  23.              const double r1,  // random number
  24.              const double r2,  // random number
  25.              point& on_light,  // point corresponding to (r1,r2)
  26.              double& prob);    // probability of selecting on_light
  27. };
  28.  
  29.